﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MailTemplateList.aspx.cs" Inherits="BEGDC.CC.Web.EZVisit.SystemTools.MailTemplateList" %>

<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="atlas" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../css/global.css" type="text/css" rel="stylesheet" />
    <link href="../../css/main.css" type="text/css" rel="stylesheet" />
    <link href="../../css/style.css" type="text/css" rel="stylesheet" />

    <script src="../../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        function showDialog(url) {

            var obj = window.showModalDialog(url, this, 'dialogWidth=800px;dialogHeight=600px;status=0;help=0');
            if (obj == 'reload') {
                //document.Form1.submit();

                window.location.href = window.location.href;
            }
        }
    </script>

</head>
<body>
    <div class="sitemapbox">
        <div class="sitemap">
            <span class="sitemap_root">&raquo;System Tools &nbsp;&raquo;Mail Template </span>
        </div>
    </div>
    <%-- Empty DIV for clearing float. Can be replaced by CSS ":after". --%>
    <div style="clear: left">
    </div>
    <div class="tabbox purplebg_dark">
        <ul class="tabpos">
            <li><span class="tab_active">Mail Template 邮件模板</span></li></ul>
    </div>
    <%-- Empty DIV for clearing float. Can be replaced by CSS ":after". --%>
    <div style="clear: left">
    </div>
    <form id="form1" runat="server">
    <div class="padding5">
        <asp:DataGrid ID="dgList" ShowHeader="True" Width="98%" AutoGenerateColumns="False" BorderWidth="1" runat="server" PageSize="10"
            AllowPaging="True" PagerStyle-Visible="False" AllowSorting="False" CssClass="tablestyle">
            <ItemStyle CssClass="tbody trwhitebg" />
            <AlternatingItemStyle CssClass="tbody trpurplebg" />
            <HeaderStyle CssClass="thead" />
            <Columns>
                <asp:TemplateColumn HeaderText="Template Code模板编号" SortExpression="TemplateCode">
                    <ItemTemplate>
                        <a class="normalLink" href="#" onclick="showDialog('MailTemplateEdit.aspx?TemplateID=<%# DataBinder.Eval(Container.DataItem,"TemplateID") %>&rdm=<%= System.Guid.NewGuid() %>');"
                            onmouseover="this.style.cursor='hand'" />
                        <%# DataBinder.Eval(Container.DataItem, "TemplateCode")%></a>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="MailSubject" HeaderText="Mail Subject 主题" SortExpression="MailSubject">
                    <ItemStyle Width="45%" />
                </asp:BoundColumn>
                <asp:BoundColumn DataField="Enabled" ReadOnly="True" HeaderText="Enabled 有效" SortExpression="Enabled"></asp:BoundColumn>
                <asp:BoundColumn DataField="TemplateType" ReadOnly="True" HeaderText="Template Type 模板类型" SortExpression="TemplateType">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
            </Columns>
        </asp:DataGrid>
        <table cellspacing="0" cellpadding="0" width="98%" border="0">
            <tbody>
                <tr>
                    <td valign="middle">
                        Total Records:
                        <asp:Label ID="lblRecordCount" runat="server">lblRecordCount</asp:Label>&nbsp;&nbsp;&nbsp;<img src="../../images/PageIcon.GIF"
                            border="0">&nbsp;Page:
                        <asp:Label ID="lblCurrentPageIndex" runat="server">lblCurrentPageIndex</asp:Label>&nbsp;/&nbsp;
                        <asp:Label ID="lblPageCount" runat="server">lblPageCount</asp:Label>
                    </td>
                    <td align="right">
                        <asp:ImageButton ID="btnPageFirst" runat="server" ImageUrl="../../images/pg_first.gif" ImageAlign="AbsMiddle" OnClick="btnPageFirst_Click">
                        </asp:ImageButton>&nbsp;
                        <asp:ImageButton ID="btnPagePrev" runat="server" ImageUrl="../../images/pg_pre.gif" ImageAlign="AbsMiddle" OnClick="btnPagePrev_Click">
                        </asp:ImageButton>&nbsp;
                        <asp:ImageButton ID="btnPageNext" runat="server" ImageUrl="../../images/pg_next.gif" ImageAlign="AbsMiddle" OnClick="btnPageNext_Click">
                        </asp:ImageButton>&nbsp;
                        <asp:ImageButton ID="btnPageLast" runat="server" ImageUrl="../../images/pg_last.gif" ImageAlign="AbsMiddle" OnClick="btnPageLast_Click">
                        </asp:ImageButton>&nbsp; Go To Page:
                        <asp:TextBox ID="txtPage" runat="server" Width="25px" onmouseover="this.className='TEXTBOXHOVER';" onMouseOut="this.className='TEXTBOX';"
                            CssClass="TEXTBOX" MaxLength="5"></asp:TextBox>
                        <asp:ImageButton ID="btnGotoPage" runat="server" ImageUrl="../../images/PageIcon.GIF" OnClick="btnGotoPage_Click"></asp:ImageButton>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    </form>

    <script type="text/javascript">
        $(document).ready(function() {
            $('.trwhitebg').mouseover(function() {
                $(this).removeClass('trwhitebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trwhitebg')
            });
            $('.trpurplebg').mouseover(function() {
                $(this).removeClass('trpurplebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trpurplebg');
            })
        });
    </script>

</body>
</html>